\(\int \frac {\cosh (a+\frac {b}{x})}{x^3} \, dx\) [28]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [C] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 29 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x^3} \, dx=\frac {\cosh \left (a+\frac {b}{x}\right )}{b^2}-\frac {\sinh \left (a+\frac {b}{x}\right )}{b x} \]

[Out]

cosh(a+b/x)/b^2-sinh(a+b/x)/b/x

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {5429, 3377, 2718} \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x^3} \, dx=\frac {\cosh \left (a+\frac {b}{x}\right )}{b^2}-\frac {\sinh \left (a+\frac {b}{x}\right )}{b x} \]

[In]

Int[Cosh[a + b/x]/x^3,x]

[Out]

Cosh[a + b/x]/b^2 - Sinh[a + b/x]/(b*x)

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 5429

Int[((a_.) + Cosh[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Cosh[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Sim
plify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int x \cosh (a+b x) \, dx,x,\frac {1}{x}\right ) \\ & = -\frac {\sinh \left (a+\frac {b}{x}\right )}{b x}+\frac {\text {Subst}\left (\int \sinh (a+b x) \, dx,x,\frac {1}{x}\right )}{b} \\ & = \frac {\cosh \left (a+\frac {b}{x}\right )}{b^2}-\frac {\sinh \left (a+\frac {b}{x}\right )}{b x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x^3} \, dx=\frac {x \cosh \left (a+\frac {b}{x}\right )-b \sinh \left (a+\frac {b}{x}\right )}{b^2 x} \]

[In]

Integrate[Cosh[a + b/x]/x^3,x]

[Out]

(x*Cosh[a + b/x] - b*Sinh[a + b/x])/(b^2*x)

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.48

method result size
parallelrisch \(\frac {2 \tanh \left (\frac {a x +b}{2 x}\right ) b -2 x}{x \,b^{2} \left (\tanh \left (\frac {a x +b}{2 x}\right )^{2}-1\right )}\) \(43\)
derivativedivides \(-\frac {\left (a +\frac {b}{x}\right ) \sinh \left (a +\frac {b}{x}\right )-\cosh \left (a +\frac {b}{x}\right )-a \sinh \left (a +\frac {b}{x}\right )}{b^{2}}\) \(44\)
default \(-\frac {\left (a +\frac {b}{x}\right ) \sinh \left (a +\frac {b}{x}\right )-\cosh \left (a +\frac {b}{x}\right )-a \sinh \left (a +\frac {b}{x}\right )}{b^{2}}\) \(44\)
risch \(-\frac {\left (-x +b \right ) {\mathrm e}^{\frac {a x +b}{x}}}{2 b^{2} x}+\frac {\left (x +b \right ) {\mathrm e}^{-\frac {a x +b}{x}}}{2 b^{2} x}\) \(47\)
meijerg \(\frac {2 \sqrt {\pi }\, \cosh \left (a \right ) \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\cosh \left (\frac {b}{x}\right )}{2 \sqrt {\pi }}-\frac {b \sinh \left (\frac {b}{x}\right )}{2 \sqrt {\pi }\, x}\right )}{b^{2}}-\frac {\sinh \left (a \right ) \left (\frac {\cosh \left (\frac {b}{x}\right ) b}{x}-\sinh \left (\frac {b}{x}\right )\right )}{b^{2}}\) \(71\)

[In]

int(cosh(a+b/x)/x^3,x,method=_RETURNVERBOSE)

[Out]

(2*tanh(1/2*(a*x+b)/x)*b-2*x)/x/b^2/(tanh(1/2*(a*x+b)/x)^2-1)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.14 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x^3} \, dx=\frac {x \cosh \left (\frac {a x + b}{x}\right ) - b \sinh \left (\frac {a x + b}{x}\right )}{b^{2} x} \]

[In]

integrate(cosh(a+b/x)/x^3,x, algorithm="fricas")

[Out]

(x*cosh((a*x + b)/x) - b*sinh((a*x + b)/x))/(b^2*x)

Sympy [A] (verification not implemented)

Time = 0.39 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x^3} \, dx=\begin {cases} - \frac {\sinh {\left (a + \frac {b}{x} \right )}}{b x} + \frac {\cosh {\left (a + \frac {b}{x} \right )}}{b^{2}} & \text {for}\: b \neq 0 \\- \frac {\cosh {\left (a \right )}}{2 x^{2}} & \text {otherwise} \end {cases} \]

[In]

integrate(cosh(a+b/x)/x**3,x)

[Out]

Piecewise((-sinh(a + b/x)/(b*x) + cosh(a + b/x)/b**2, Ne(b, 0)), (-cosh(a)/(2*x**2), True))

Maxima [C] (verification not implemented)

Result contains higher order function than in optimal. Order 4 vs. order 3.

Time = 0.25 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.62 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x^3} \, dx=\frac {1}{4} \, b {\left (\frac {e^{\left (-a\right )} \Gamma \left (3, \frac {b}{x}\right )}{b^{3}} + \frac {e^{a} \Gamma \left (3, -\frac {b}{x}\right )}{b^{3}}\right )} - \frac {\cosh \left (a + \frac {b}{x}\right )}{2 \, x^{2}} \]

[In]

integrate(cosh(a+b/x)/x^3,x, algorithm="maxima")

[Out]

1/4*b*(e^(-a)*gamma(3, b/x)/b^3 + e^a*gamma(3, -b/x)/b^3) - 1/2*cosh(a + b/x)/x^2

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 93 vs. \(2 (29) = 58\).

Time = 0.27 (sec) , antiderivative size = 93, normalized size of antiderivative = 3.21 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x^3} \, dx=\frac {a e^{\left (\frac {a x + b}{x}\right )} - a e^{\left (-\frac {a x + b}{x}\right )} - \frac {{\left (a x + b\right )} e^{\left (\frac {a x + b}{x}\right )}}{x} + \frac {{\left (a x + b\right )} e^{\left (-\frac {a x + b}{x}\right )}}{x} + e^{\left (\frac {a x + b}{x}\right )} + e^{\left (-\frac {a x + b}{x}\right )}}{2 \, b^{2}} \]

[In]

integrate(cosh(a+b/x)/x^3,x, algorithm="giac")

[Out]

1/2*(a*e^((a*x + b)/x) - a*e^(-(a*x + b)/x) - (a*x + b)*e^((a*x + b)/x)/x + (a*x + b)*e^(-(a*x + b)/x)/x + e^(
(a*x + b)/x) + e^(-(a*x + b)/x))/b^2

Mupad [B] (verification not implemented)

Time = 1.56 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00 \[ \int \frac {\cosh \left (a+\frac {b}{x}\right )}{x^3} \, dx=\frac {\mathrm {cosh}\left (a+\frac {b}{x}\right )}{b^2}-\frac {\mathrm {sinh}\left (a+\frac {b}{x}\right )}{b\,x} \]

[In]

int(cosh(a + b/x)/x^3,x)

[Out]

cosh(a + b/x)/b^2 - sinh(a + b/x)/(b*x)